<div class="cil__base-block" >
  <img class="cil__top-image" src="assets/images/centaur/change.svg" />

  <form class="cil__base-block--form" [formGroup]="validateForm" nz-form>
    <div nz-row [nzGutter]="24">
      <div nz-col [nzSpan]="8">
        <nz-form-item>
          <nz-form-label>{{'GENERAL.INSTITUTION.CODE' | i18n}}</nz-form-label>
          <nz-form-control nzHasFeedback>
            <app-aams-select
              level="institution"
              nzShowSearch
              nzServerSearch
              formControlName="institution"
              name="institution"
              (ngModelChange)="handleChosenBusiness($event, eRoleType.Acquirer)"
            ></app-aams-select>
            <nz-form-explain *ngIf="validateForm.get('institution').dirty">
              <ng-container *ngIf="validateForm.get('institution').getError('required')">机构编号必填</ng-container>
            </nz-form-explain>
          </nz-form-control>
        </nz-form-item>
      </div>

      <div nz-col [nzSpan]="8">
        <nz-form-item>
          <nz-form-label>{{'GENERAL.INSTITUTION.NAME' | i18n}}</nz-form-label>
          <nz-form-control>
            <input formControlName="insName" name="insName" disabled nz-input/>
          </nz-form-control>
        </nz-form-item>
      </div>

      <div nz-col [nzSpan]="8">
        <nz-form-item>
          <nz-form-label>{{'GENERAL.INSTITUTION.NAME_EN' | i18n}}</nz-form-label>
          <nz-form-control>
            <input formControlName="insNameEN" name="insNameEN" disabled nz-input/>
          </nz-form-control>
        </nz-form-item>
      </div>

      <div nz-col [nzSpan]="8">
        <nz-form-item>
          <nz-form-label>{{'GENERAL.AGENT.CODE' | i18n}}</nz-form-label>
          <nz-form-control nzHasFeedback>
            <app-aams-select
              level="agent"
              nzShowSearch
              nzServerSearch
              formControlName="agent"
              name="agent"
              [insCode]="chosenAcquirer ? chosenAcquirer.code : ''"
              (ngModelChange)="handleChosenBusiness($event, eRoleType.Group)"
            ></app-aams-select>
          </nz-form-control>
        </nz-form-item>
      </div>

      <div nz-col [nzSpan]="8">
        <nz-form-item>
          <nz-form-label>{{'GENERAL.AGENT.NAME' | i18n}}</nz-form-label>
          <nz-form-control>
            <input formControlName="agentName" name="agentName" disabled nz-input/>
          </nz-form-control>
        </nz-form-item>
      </div>

      <div nz-col [nzSpan]="8">
        <nz-form-item>
          <nz-form-label>{{'GENERAL.AGENT.NAME_EN' | i18n}}</nz-form-label>
          <nz-form-control>
            <input formControlName="agentNameEN" name="agentNameEN" disabled nz-input/>
          </nz-form-control>
        </nz-form-item>
      </div>
    </div>
  </form>
</div>
